Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Sep 25, 2022

This PR contains the following updates:

Package Change Age Confidence
svelte (source) 3.31.23.59.2 age confidence

GitHub Vulnerability Alerts

CVE-2022-25875

The package svelte before 3.49.0 is vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.

CVE-2024-45047

Summary

A potential XSS vulnerability exists in Svelte for versions prior to 4.2.19.

Details

Svelte improperly escapes HTML on server-side rendering. It converts strings according to the following rules:

  • If the string is an attribute value:
    • " -> "
    • & -> &
    • Other characters -> No conversion
  • Otherwise:
    • < -> &lt;
    • & -> &amp;
    • Other characters -> No conversion

The assumption is that attributes will always stay as such, but in some situation the final DOM tree rendered on browsers is different from what Svelte expects on server-side rendering. This may be leveraged to perform XSS attacks. More specifically, this can occur when injecting malicious content into an attribute within a <noscript> tag.

PoC

A vulnerable page (+page.svelte):

<script>
import { page } from "$app/stores"

// user input
let href = $page.url.searchParams.get("href") ?? "https://example.com";
</script>

<noscript>
  <a href={href}>test</a>
</noscript>

If a user accesses the following URL,

http://localhost:4173/?href=</noscript><script>alert(123)</script>

then, alert(123) will be executed.

Impact

XSS, when using an attribute within a noscript tag

GHSA-gw32-9rmw-qwww

Summary

A server-side rendered <textarea> with two-way bound value does not have its value correctly escaped in the rendered HTML.

Details

In SSR, <textarea bind:value={...}> does not have its value escaped when it is rendered into the HTML as <textarea>...</textarea>.

PoC

Put this in a server-side-rendered Svelte component:

<script>
  let value = `test'"></textarea><script` + `>alert('BIM');</sc` + `ript>`;
</script>

<textarea bind:value />

Impact

  • Only affects SSR
  • Needs a <textarea bind:value> filled by user content via two-way binding

Release Notes

sveltejs/svelte (svelte)

v3.59.2

Compare Source

v3.59.1

Compare Source

v3.59.0

Compare Source

v3.58.0

Compare Source

v3.57.0

Compare Source

v3.56.0

Compare Source

v3.55.1

Compare Source

v3.55.0

Compare Source

v3.54.0

Compare Source

v3.53.1

Compare Source

v3.53.0

Compare Source

v3.52.0

Compare Source

v3.51.0

Compare Source

v3.50.1

Compare Source

v3.50.0

Compare Source

v3.49.0

Compare Source

v3.48.0

Compare Source

v3.47.0

Compare Source

v3.46.6

Compare Source

v3.46.5

Compare Source

v3.46.4

Compare Source

v3.46.3

Compare Source

v3.46.2

Compare Source

v3.46.1

Compare Source

v3.46.0

Compare Source

v3.45.0

Compare Source

v3.44.3

Compare Source

v3.44.2

Compare Source

v3.44.1

Compare Source

v3.44.0

Compare Source

v3.43.2

Compare Source

v3.43.1

Compare Source

v3.43.0

Compare Source

v3.42.6

Compare Source

v3.42.5

Compare Source

v3.42.4

Compare Source

v3.42.3

Compare Source

v3.42.2

Compare Source

v3.42.1

Compare Source

v3.42.0

Compare Source

v3.41.0

Compare Source

v3.40.3

Compare Source

v3.40.2

Compare Source

v3.40.1

Compare Source

v3.40.0

Compare Source

v3.39.0

Compare Source

v3.38.3

Compare Source

v3.38.2

Compare Source

v3.38.1

Compare Source

v3.38.0

Compare Source

v3.37.0

Compare Source

v3.36.0

Compare Source

v3.35.0

Compare Source

v3.34.0

Compare Source

v3.33.0

Compare Source

v3.32.3

Compare Source

v3.32.2

Compare Source

v3.32.1

Compare Source

v3.32.0

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/npm-svelte-vulnerability branch from 577ed92 to 6b1fe56 Compare August 30, 2024 18:48
@renovate renovate bot changed the title Update dependency svelte to v3.49.0 [SECURITY] Update dependency svelte to v4 [SECURITY] Aug 30, 2024
@renovate renovate bot force-pushed the renovate/npm-svelte-vulnerability branch 2 times, most recently from 1122d18 to a08f79f Compare August 13, 2025 14:35
@renovate renovate bot force-pushed the renovate/npm-svelte-vulnerability branch from a08f79f to 0b44327 Compare August 31, 2025 10:15
@renovate renovate bot force-pushed the renovate/npm-svelte-vulnerability branch from 0b44327 to 503af87 Compare September 25, 2025 20:35
@renovate renovate bot force-pushed the renovate/npm-svelte-vulnerability branch from 503af87 to 48f4ee7 Compare November 11, 2025 01:42
@renovate renovate bot force-pushed the renovate/npm-svelte-vulnerability branch from 48f4ee7 to c4df708 Compare January 16, 2026 21:41
@renovate renovate bot changed the title Update dependency svelte to v4 [SECURITY] Update dependency svelte to v3.59.2 [SECURITY] Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant